/**
 * @(#)HttpParamterConvertHandler.java
 * Copyright 2012 naryou, Inc. All rights reserved.
 */
package com.dili.dd.gpi.util.spring;

import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.NativeWebRequest;

import javax.servlet.http.HttpServletRequest;

/**
 * @author  tiger
 * @date  2012-11-16
 * description
 */
@Component
public class HttpParameterParserConvertHandler implements CustomObjectConvertHandler{

	@Override
	public Object execute(MethodParameter methodParameter, NativeWebRequest webRequest) {
		return HttpParameterParser.newInstance((HttpServletRequest) webRequest.getNativeRequest());
	}

	@Override
	public Class<?> getObjectType() {
		return HttpParameterParser.class;
	}
}